<script setup lang="ts">
import { RouterView } from 'vue-router';
import TabBar from './components/TabBar.vue';
import { useRoute } from 'vue-router';

const route = useRoute();
const showTabBar = route.path !== '/chat';
</script>

<template>
  <div class="app-container">
    <RouterView />
    <TabBar v-if="showTabBar" />
  </div>
</template>

<style>
.app-container {
  max-width: 100vw;
  min-height: 100vh;
  position: relative;
  padding-bottom: 50px; /* 为底部导航栏留出空间 */
}

.van-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
</style>
